class HomeMo {
  List<BannerMo>? bannerList;
  List<CategoryMo>? categoryList;
  List<VideoMo>? videoList;

  HomeMo({this.bannerList, this.categoryList, this.videoList});

  HomeMo.fromJson(Map<String, dynamic> json) {
    bannerList = json["bannerList"] == null
        ? null
        : (json["bannerList"] as List)
            .map((e) => BannerMo.fromJson(e))
            .toList();
    categoryList = json["categoryList"] == null
        ? null
        : (json["categoryList"] as List)
            .map((e) => CategoryMo.fromJson(e))
            .toList();
    videoList = json["videoList"] == null
        ? null
        : (json["videoList"] as List).map((e) => VideoMo.fromJson(e)).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if (bannerList != null) {
      _data["bannerList"] = bannerList?.map((e) => e.toJson()).toList();
    }
    if (categoryList != null) {
      _data["categoryList"] = categoryList?.map((e) => e.toJson()).toList();
    }
    if (videoList != null) {
      _data["videoList"] = videoList?.map((e) => e.toJson()).toList();
    }
    return _data;
  }
}

class VideoMo {
  int? id;
  String? vid;
  String? title;
  String? url;
  String? cover;
  int? pubdate;
  String? desc;
  int? view;
  int? duration;
  Owner? owner;
  int? reply;
  int? favorite;
  int? like;
  int? coin;
  int? share;
  String? createTime;
  int? size;

  VideoMo(
      {this.id,
      this.vid,
      this.title,
      this.url,
      this.cover,
      this.pubdate,
      this.desc,
      this.view,
      this.duration,
      this.owner,
      this.reply,
      this.favorite,
      this.like,
      this.coin,
      this.share,
      this.createTime,
      this.size});

  VideoMo.fromJson(Map<String, dynamic> json) {
    id = json["id"];
    vid = json["vid"];
    title = json["title"];
    url = json["url"];
    cover = json["cover"];
    pubdate = json["pubdate"];
    desc = json["desc"];
    view = json["view"];
    duration = json["duration"];
    owner = json["owner"] == null ? null : Owner.fromJson(json["owner"]);
    reply = json["reply"];
    favorite = json["favorite"];
    like = json["like"];
    coin = json["coin"];
    share = json["share"];
    createTime = json["createTime"];
    size = json["size"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["id"] = id;
    _data["vid"] = vid;
    _data["title"] = title;
    _data["url"] = url;
    _data["cover"] = cover;
    _data["pubdate"] = pubdate;
    _data["desc"] = desc;
    _data["view"] = view;
    _data["duration"] = duration;
    if (owner != null) {
      _data["owner"] = owner?.toJson();
    }
    _data["reply"] = reply;
    _data["favorite"] = favorite;
    _data["like"] = like;
    _data["coin"] = coin;
    _data["share"] = share;
    _data["createTime"] = createTime;
    _data["size"] = size;
    return _data;
  }
}

class Owner {
  String? name;
  String? face;
  int? fans;

  Owner({this.name, this.face, this.fans});

  Owner.fromJson(Map<String, dynamic> json) {
    name = json["name"];
    face = json["face"];
    fans = json["fans"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["name"] = name;
    _data["face"] = face;
    _data["fans"] = fans;
    return _data;
  }
}

class CategoryMo {
  String? name;
  int? count;

  CategoryMo({this.name, this.count});

  CategoryMo.fromJson(Map<String, dynamic> json) {
    name = json["name"];
    count = json["count"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["name"] = name;
    _data["count"] = count;
    return _data;
  }
}

class BannerMo {
  String? id;
  int? sticky;
  String? type;
  String? title;
  String? subtitle;
  String? url;
  String? cover;
  String? createTime;

  BannerMo(
      {this.id,
      this.sticky,
      this.type,
      this.title,
      this.subtitle,
      this.url,
      this.cover,
      this.createTime});

  BannerMo.fromJson(Map<String, dynamic> json) {
    id = json["id"];
    sticky = json["sticky"];
    type = json["type"];
    title = json["title"];
    subtitle = json["subtitle"];
    url = json["url"];
    cover = json["cover"];
    createTime = json["createTime"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["id"] = id;
    _data["sticky"] = sticky;
    _data["type"] = type;
    _data["title"] = title;
    _data["subtitle"] = subtitle;
    _data["url"] = url;
    _data["cover"] = cover;
    _data["createTime"] = createTime;
    return _data;
  }
}
